﻿// Copyright (c) ZhangPeihang. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using LaserMark.Components.Services;
using LaserMark.DataAccess.Models;

namespace LaserMark.View.Services;

public class GlobalStatus : IGlobalStatus
{
    /// <summary>
    ///
    /// </summary>
    public bool IsRunning { get; set; }

    /// <summary>
    ///
    /// </summary>
    public bool IsXZeroBack { get; set; }

    /// <summary>
    ///
    /// </summary>
    public bool IsYZeroBack { get; set; }

    /// <summary>
    ///
    /// </summary>
    public bool IsZZeroBack { get; set; }

    /// <summary>
    /// 
    /// </summary>
    public bool IsRestart { get; set; } = false;

    /// <summary>
    /// 
    /// </summary>
    public bool IsPause { get; set; } = false;

    /// <summary>
    /// 
    /// </summary>
    public bool IsStop { get; set; } = false;

    /// <summary>
    /// 标记本轮打标是否完成
    /// </summary>
    public bool IsMarked { get; set; } = false;


    /// <summary>
    /// 
    /// </summary>
    [NotNull]
    public List<AuditLog>? AuditLog { get; set; } = new();

    public bool IsEmergencyStop { get; set; }

    public bool IsStateTimeOut { get; set; }

    public bool IsLimitY { get; set; }
    public bool IsLimitX { get; set; }
    public bool IsLimitZA { get; set; }
    public bool IsLimitZN { get; set; }
    public bool Iscan { get; set; }
    public string? ScanMesaage { get; set; }

    public string? ProductMessage { get; set; }

    /// <summary>
    /// /
    /// </summary>
    public bool IsOnlyTransfor { get; set; }

    /// <summary>
    /// 
    /// </summary>
    public bool IsTransComplete { get; set; }

    public CancellationTokenSource? StopToken { get; set; } = new();
}
